package nancal.mp.db.mongo.table

import java.io.*
import nbcp.base.db.*
import nbcp.base.comm.*
import nbcp.base.extend.*
import nbcp.base.enums.*
import nbcp.base.utils.*
import nbcp.myoql.db.*
import nbcp.myoql.db.comm.*
import nbcp.myoql.db.enums.*
import nbcp.myoql.db.mongo.*
import nbcp.myoql.db.mongo.base.*
import nbcp.myoql.db.mongo.component.*
import org.slf4j.LoggerFactory
import org.springframework.stereotype.*


@Component("mongo.sys")
@MetaDataGroup(DatabaseEnum.Mongo, "sys")
class SysGroup : IDataGroup {
    override fun getEntities(): Set<BaseMetaData<out Any>> = setOf(apiRouterDefine, appMenu, brandInfo, categoryInfo, gatewayRouteDefine, homeInfo, imContent, k8sSyncSetting, langResource, microServiceInfo, sensitiveWord, ssoConfig, ssoLog, subSystemInfo, subSystemUserInfo, sysEmailInfo, userMessageInfo, test)


    /**
     * Api路由定义
     */
    val apiRouterDefine get() = ApiRouterDefineEntity();



    /**
     * 菜单 (变表)
     */
    val appMenu get() = AppMenuEntity();



    /**
     * 菜单 (变表)
     */
    fun appMenu(appId: String) = AppMenuEntity("appMenu-${appId}");



    val brandInfo get() = BrandInfoEntity();




    val categoryInfo get() = CategoryInfoEntity();



    /**
     * 网关路由定义
     */
    val gatewayRouteDefine get() = GatewayRouteDefineEntity();



    /**
     * v2_单个系统信息
     */
    val homeInfo get() = HomeInfoEntity();




    val imContent get() = ImContentEntity();



    /**
     * K8s使用脚本同步配置
     */
    val k8sSyncSetting get() = K8sSyncSettingEntity();




    val langResource get() = LangResourceEntity();



    /**
     * 微服务信息
     */
    val microServiceInfo get() = MicroServiceInfoEntity();




    val sensitiveWord get() = SensitiveWordEntity();



    /**
     * sso应用配置
     */
    val ssoConfig get() = SsoConfigEntity();



    /**
     * sso日志
     */
    val ssoLog get() = SsoLogEntity();



    /**
     * 子系统信息
     */
    val subSystemInfo get() = SubSystemInfoEntity();



    /**
     * 子系统用户信息
     */
    val subSystemUserInfo get() = SubSystemUserInfoEntity();



    /**
     * Email配置
     */
    val sysEmailInfo get() = SysEmailInfoEntity();



    /**
     * 用户消息
     */
    val userMessageInfo get() = UserMessageInfoEntity();




    val test get() = testEntity();


    /**
     * Api路由定义
     */
    @nbcp.base.db.annotation.Cn(value = """Api路由定义""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class ApiRouterDefineEntity(collectionName: String = "apiRouterDefine") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.ApiRouterDefine>(nancal.mp.db.mongo.entity.sys.ApiRouterDefine::class.java, collectionName) {

        val id = MongoColumnName("_id")

        val sourcePath = MongoColumnName("sourcePath")

        val targetPath = MongoColumnName("targetPath")

        val whenHost = MongoColumnName("whenHost")

        val whenHeaders = MongoColumnName("whenHeaders")

        val remark = MongoColumnName("remark")

        val createBy = IdNameMeta("createBy")

        val updateBy = IdNameMeta("updateBy")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * 菜单 (变表)
     */
    @nbcp.base.db.annotation.Cn(value = """菜单""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.myoql.db.comm.VarTable(value = """appId""")
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class AppMenuEntity(collectionName: String = "appMenu") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.AppMenu>(nancal.mp.db.mongo.entity.sys.AppMenu::class.java, collectionName) {

        val id = MongoColumnName("_id")

        /**
         * 菜单名称
         */
        @nbcp.base.db.annotation.Cn(value = """菜单名称""") 
        val name = MongoColumnName("name")

        /**
         * 资源编码
         */
        @nbcp.base.db.annotation.Cn(value = """资源编码""") 
        val code = MongoColumnName("code")

        /**
         * 英文名称
         */
        @nbcp.base.db.annotation.Cn(value = """英文名称""") 
        val enName = MongoColumnName("enName")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

        /**
         * 菜单链接
         */
        @nbcp.base.db.annotation.Cn(value = """菜单链接""") 
        val url = MongoColumnName("url")

        /**
         * class
         */
        @nbcp.base.db.annotation.Cn(value = """class""") 
        val css = MongoColumnName("css")

        /**
         * 排序
         */
        @nbcp.base.db.annotation.Cn(value = """排序""") 
        val sort = MongoColumnName("sort")

        val parent = IdNameMeta("parent")

    }


    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class BrandInfoEntity(collectionName: String = "brandInfo") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.BrandInfo>(nancal.mp.db.mongo.entity.sys.BrandInfo::class.java, collectionName) {

        val id = MongoColumnName("_id")

        val name = MongoColumnName("name")

        val code = MongoColumnName("code")

        val english = MongoColumnName("english")

        val pcode = MongoColumnName("pcode")

        val logo = IdUrlMeta("logo")

        val order = MongoColumnName("order")

        val banner = IdUrlMeta("banner")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }


    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class CategoryInfoEntity(collectionName: String = "categoryInfo") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.CategoryInfo>(nancal.mp.db.mongo.entity.sys.CategoryInfo::class.java, collectionName) {

        val id = MongoColumnName("_id")

        val name = MongoColumnName("name")

        val code = MongoColumnName("code")

        val english = MongoColumnName("english")

        val parents = IdCodeNameMeta("parents")

        val logo = IdUrlMeta("logo")

        val commission = MongoColumnName("commission")

        val order = MongoColumnName("order")

        val banner = IdUrlMeta("banner")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * 网关路由定义
     */
    @nbcp.base.db.annotation.Cn(value = """网关路由定义""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class GatewayRouteDefineEntity(collectionName: String = "gatewayRouteDefine") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.GatewayRouteDefine>(nancal.mp.db.mongo.entity.sys.GatewayRouteDefine::class.java, collectionName) {

        val id = MongoColumnName("_id")

        val name = MongoColumnName("name")

        val target = MongoColumnName("target")

        val isBlock = MongoColumnName("isBlock")

        val remark = MongoColumnName("remark")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * v2_单个系统信息
     */
    @nbcp.base.db.annotation.Cn(value = """v2_单个系统信息""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class HomeInfoEntity(collectionName: String = "homeInfo") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.HomeInfo>(nancal.mp.db.mongo.entity.sys.HomeInfo::class.java, collectionName) {

        val id = MongoColumnName("_id")

        /**
         * 应用名称
         */
        @nbcp.base.db.annotation.Cn(value = """应用名称""") 
        val name = MongoColumnName("name")

        /**
         * 描述内容
         */
        @nbcp.base.db.annotation.Cn(value = """描述内容""") 
        val remark = MongoColumnName("remark")

        /**
         * 跳转的url
         */
        @nbcp.base.db.annotation.Cn(value = """跳转的url""") 
        val url = MongoColumnName("url")

        /**
         * 跳转的fullUrl
         */
        @nbcp.base.db.annotation.Cn(value = """跳转的fullUrl""") 
        val fullUrl = MongoColumnName("fullUrl")

        /**
         * ico
         */
        @nbcp.base.db.annotation.Cn(value = """ico""") 
        val ico = MongoColumnName("ico")

        /**
         * 对应的子系统枚举
         */
        @nbcp.base.db.annotation.Cn(value = """对应的子系统枚举""") 
        val sysEnum = MongoColumnName("sysEnum")

        /**
         * 属于的中台分类
         */
        @nbcp.base.db.annotation.Cn(value = """属于的中台分类""") 
        val type = MongoColumnName("type")

        /**
         * 标记
         */
        @nbcp.base.db.annotation.Cn(value = """标记""") 
        val flag = MongoColumnName("flag")

        /**
         * 排序
         */
        @nbcp.base.db.annotation.Cn(value = """排序""") 
        val sort = MongoColumnName("sort")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }


    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class ImContentEntity(collectionName: String = "imContent") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.ImContent>(nancal.mp.db.mongo.entity.sys.ImContent::class.java, collectionName) {

        val id = MongoColumnName("_id")

        val product = IdNameUrlMeta("product")

        val orderId = MongoColumnName("orderId")

        val subject = MongoColumnName("subject")

        val speeker = IdNameUrlMeta("speeker")

        val content = MongoColumnName("content")

        val images = IdUrlMeta("images")

        val files = IdUrlMeta("files")

        val target = IdNameUrlMeta("target")

        val refContent = MongoColumnName("refContent")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * K8s使用脚本同步配置
     */
    @nbcp.base.db.annotation.Cn(value = """K8s使用脚本同步配置""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class K8sSyncSettingEntity(collectionName: String = "k8sSyncSetting") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.K8sSyncSetting>(nancal.mp.db.mongo.entity.sys.K8sSyncSetting::class.java, collectionName) {

        val id = MongoColumnName("_id")

        val name = MongoColumnName("name")

        val testSsh = SshServerConfigMeta("testSsh")

        val prodK8s = K8sServerConfigMeta("prodK8s")

        val prodRegistry = ImageRegistryConfigMeta("prodRegistry")

        val isActive = MongoColumnName("isActive")

        val testPushScript = MongoColumnName("testPushScript")

        val prodDeployScript = MongoColumnName("prodDeployScript")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }


    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    @nbcp.myoql.db.comm.DbEntityCascadeDefine(idField = """productLine.id""", cascadeField = """productLine.name""", refEntityClass = nancal.mp.db.mongo.entity.dev.ProductLine::class)
    class LangResourceEntity(collectionName: String = "langResource") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.LangResource>(nancal.mp.db.mongo.entity.sys.LangResource::class.java, collectionName) {

        val id = MongoColumnName("_id")

        val productLine = IdCodeNameMeta("productLine")

        val key = MongoColumnName("key")

        val cn = MongoColumnName("cn")

        val en = MongoColumnName("en")

        val remark = MongoColumnName("remark")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * 微服务信息
     */
    @nbcp.base.db.annotation.Cn(value = """微服务信息""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class MicroServiceInfoEntity(collectionName: String = "microServiceInfo") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.MicroServiceInfo>(nancal.mp.db.mongo.entity.sys.MicroServiceInfo::class.java, collectionName) {

        val id = MongoColumnName("_id")

        /**
         * 微服务模块名称
         */
        @nbcp.base.db.annotation.Cn(value = """微服务模块名称""") 
        val name = MongoColumnName("name")

        /**
         * 功能简介
         */
        @nbcp.base.db.annotation.Cn(value = """功能简介""") 
        val remark = MongoColumnName("remark")

        /**
         * version
         */
        @nbcp.base.db.annotation.Cn(value = """version""") 
        val version = MongoColumnName("version")

        /**
         * 文档地址
         */
        @nbcp.base.db.annotation.Cn(value = """文档地址""") 
        val docSrc = MongoColumnName("docSrc")

        /**
         * 关联企业信息
         */
        @nbcp.base.db.annotation.Cn(value = """关联企业信息""") 
        val corp = IdNameMeta("corp")

        /**
         * 所属业务域
         */
        @nbcp.base.db.annotation.Cn(value = """所属业务域""") 
        val type = MongoColumnName("type")

        /**
         * 微服务详情
         */
        @nbcp.base.db.annotation.Cn(value = """微服务详情""") 
        val details = MicroDetailMeta("details")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }


    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class SensitiveWordEntity(collectionName: String = "sensitiveWord") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.SensitiveWord>(nancal.mp.db.mongo.entity.sys.SensitiveWord::class.java, collectionName) {

        val id = MongoColumnName("_id")

        val word = MongoColumnName("word")

        val mask = MongoColumnName("mask")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * sso应用配置
     */
    @nbcp.base.db.annotation.Cn(value = """sso应用配置""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class SsoConfigEntity(collectionName: String = "ssoConfig") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.SsoConfig>(nancal.mp.db.mongo.entity.sys.SsoConfig::class.java, collectionName) {

        val id = MongoColumnName("_id")

        /**
         * 应用名称
         */
        @nbcp.base.db.annotation.Cn(value = """应用名称""") 
        val name = MongoColumnName("name")

        /**
         * 应用秘钥
         */
        @nbcp.base.db.annotation.Cn(value = """应用秘钥""") 
        val secrect = MongoColumnName("secrect")

        /**
         * 应用主页
         */
        @nbcp.base.db.annotation.Cn(value = """应用主页""") 
        val homepageUrl = MongoColumnName("homepageUrl")

        /**
         * 应用Host
         */
        @nbcp.base.db.annotation.Cn(value = """应用Host""") 
        val host = MongoColumnName("host")

        /**
         * appId
         */
        @nbcp.base.db.annotation.Cn(value = """appId""") 
        val appId = MongoColumnName("appId")

        /**
         * 描述
         */
        @nbcp.base.db.annotation.Cn(value = """描述""") 
        val remark = MongoColumnName("remark")

        /**
         * 所属企业
         */
        @nbcp.base.db.annotation.Cn(value = """所属企业""") 
        val corp = IdNameMeta("corp")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * sso日志
     */
    @nbcp.base.db.annotation.Cn(value = """sso日志""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class SsoLogEntity(collectionName: String = "ssoLog") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.SsoLog>(nancal.mp.db.mongo.entity.sys.SsoLog::class.java, collectionName) {

        val id = MongoColumnName("_id")

        /**
         * 应用
         */
        @nbcp.base.db.annotation.Cn(value = """应用""") 
        val info = IdNameMeta("info")

        /**
         * 回调状态
         */
        @nbcp.base.db.annotation.Cn(value = """回调状态""") 
        val status = MongoColumnName("status")

        /**
         * 临时token
         */
        @nbcp.base.db.annotation.Cn(value = """临时token""") 
        val tempToken = MongoColumnName("tempToken")

        /**
         * 有效token
         */
        @nbcp.base.db.annotation.Cn(value = """有效token""") 
        val realToken = MongoColumnName("realToken")

        /**
         * 错误信息
         */
        @nbcp.base.db.annotation.Cn(value = """错误信息""") 
        val remark = MongoColumnName("remark")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * 子系统信息
     */
    @nbcp.base.db.annotation.Cn(value = """子系统信息""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class SubSystemInfoEntity(collectionName: String = "subSystemInfo") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.SubSystemInfo>(nancal.mp.db.mongo.entity.sys.SubSystemInfo::class.java, collectionName) {

        val id = MongoColumnName("_id")

        /**
         * 名称
         */
        @nbcp.base.db.annotation.Cn(value = """名称""") 
        val name = MongoColumnName("name")

        /**
         * 页面路径
         */
        @nbcp.base.db.annotation.Cn(value = """页面路径""") 
        val pageUrl = MongoColumnName("pageUrl")

        /**
         * 登录接口
         */
        @nbcp.base.db.annotation.Cn(value = """登录接口""") 
        val loginUrl = MongoColumnName("loginUrl")

        /**
         * 注册接口
         */
        @nbcp.base.db.annotation.Cn(value = """注册接口""") 
        val registerUrl = MongoColumnName("registerUrl")

        @nbcp.base.db.annotation.Cn(value = """""") 
        val port = MongoColumnName("port")

        /**
         * 登录参数
         */
        @nbcp.base.db.annotation.Cn(value = """登录参数""") 
        val loginParam = MongoColumnName("loginParam")

        /**
         * 登录成功返回status
         */
        @nbcp.base.db.annotation.Cn(value = """登录成功返回status""") 
        val responseStatus = MongoColumnName("responseStatus")

        /**
         * 管理员用户名
         */
        @nbcp.base.db.annotation.Cn(value = """管理员用户名""") 
        val adminName = MongoColumnName("adminName")

        /**
         * 管理员密码
         */
        @nbcp.base.db.annotation.Cn(value = """管理员密码""") 
        val adminPwd = MongoColumnName("adminPwd")

        /**
         * 管理员token
         */
        @nbcp.base.db.annotation.Cn(value = """管理员token""") 
        val adminToken = MongoColumnName("adminToken")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * 子系统用户信息
     */
    @nbcp.base.db.annotation.Cn(value = """子系统用户信息""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class SubSystemUserInfoEntity(collectionName: String = "subSystemUserInfo") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.SubSystemUserInfo>(nancal.mp.db.mongo.entity.sys.SubSystemUserInfo::class.java, collectionName) {

        val id = MongoColumnName("_id")

        /**
         * 关联用户表
         */
        @nbcp.base.db.annotation.Cn(value = """关联用户表""") 
        val user = IdNameMeta("user")

        /**
         * 密码随机字符串
         */
        @nbcp.base.db.annotation.Cn(value = """密码随机字符串""") 
        val secKey = MongoColumnName("secKey")

        /**
         * 可以登录的系统
         */
        @nbcp.base.db.annotation.Cn(value = """可以登录的系统""") 
        val authSys = IdNameMeta("authSys")

        /**
         * 用户各系统登录信息
         */
        @nbcp.base.db.annotation.Cn(value = """用户各系统登录信息""") 
        val authList = UserAuthInfoMeta("authList")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * Email配置
     */
    @nbcp.base.db.annotation.Cn(value = """Email配置""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class SysEmailInfoEntity(collectionName: String = "sysEmailInfo") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.SysEmailInfo>(nancal.mp.db.mongo.entity.sys.SysEmailInfo::class.java, collectionName) {

        val id = MongoColumnName("_id")

        /**
         * 邮件标题
         */
        @nbcp.base.db.annotation.Cn(value = """邮件标题""") 
        val title = MongoColumnName("title")

        /**
         * 邮件内容
         */
        @nbcp.base.db.annotation.Cn(value = """邮件内容""") 
        val content = MongoColumnName("content")

        /**
         * 邮件接受者
         */
        @nbcp.base.db.annotation.Cn(value = """邮件接受者""") 
        val users = MongoColumnName("users")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

    /**
     * 用户消息
     */
    @nbcp.base.db.annotation.Cn(value = """用户消息""")
    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    class UserMessageInfoEntity(collectionName: String = "userMessageInfo") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.UserMessageInfo>(nancal.mp.db.mongo.entity.sys.UserMessageInfo::class.java, collectionName) {

        val id = MongoColumnName("_id")

        /**
         * 所属系统
         */
        @nbcp.base.db.annotation.Cn(value = """所属系统""") 
        val system = MongoColumnName("system")

        /**
         * 关联用户信息
         */
        @nbcp.base.db.annotation.Cn(value = """关联用户信息""") 
        val user = IdNameMeta("user")

        /**
         * 消息类型
         */
        @nbcp.base.db.annotation.Cn(value = """消息类型""") 
        val type = MongoColumnName("type")

        /**
         * 是否已读
         */
        @nbcp.base.db.annotation.Cn(value = """是否已读""") 
        val read = MongoColumnName("read")

        /**
         * 显示内容
         */
        @nbcp.base.db.annotation.Cn(value = """显示内容""") 
        val content = MongoColumnName("content")

        /**
         * 跳转src
         */
        @nbcp.base.db.annotation.Cn(value = """跳转src""") 
        val src = MongoColumnName("src")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }


    @org.springframework.data.mongodb.core.mapping.Document()
    @nbcp.base.db.annotation.DbEntityGroup(value = """sys""")
    @nbcp.myoql.db.comm.RemoveToSysDustbin
    @nbcp.myoql.db.comm.DbEntityCascadeDefine(idField = """createBy.id""", cascadeField = """createBy.name""", refEntityClass = nancal.mp.db.mongo.entity.wx.WxAppUser::class)
    class testEntity(collectionName: String = "test") :
        MongoBaseMetaCollection<nancal.mp.db.mongo.entity.sys.test>(nancal.mp.db.mongo.entity.sys.test::class.java, collectionName) {

        val id = MongoColumnName("_id")

        val name = MongoColumnName("name")

        val createBy = OpenIdNameMeta("createBy")

        /**
         * 创建时间
         */
        @nbcp.base.db.annotation.Cn(value = """创建时间""") 
        val createAt = MongoColumnName("createAt")

        /**
         * 更新时间
         */
        @nbcp.base.db.annotation.Cn(value = """更新时间""") 
        val updateAt = MongoColumnName("updateAt")

    }

}

